package com.ioc;

import com.ioc.controller.UserController;
import com.ioc.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringApplication {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContext-anno.xml");
        // UserController userController = context.getBean("userController", UserController.class);
        UserService userService = context.getBean("userService", UserService.class);
        userService.update(10);
    }
}
